package com.keli.task;

import org.apache.log4j.Logger;

import com.keli.service.TimeService;

public class Scheduler extends Thread {
	private Logger logger = Logger.getLogger(getClass());
	private long idleTime;
	
	public Scheduler(long idleTime) {
		this.idleTime = idleTime;
	}

	@Override
	public void run() {
		while (true) {
			logger.info(TimeService.curentTime());

			try {
				Thread.sleep(idleTime);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

	}
}
